﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.lmpop.createIndex.search.*"%>
<%@page import="com.lmpop.frame.util.PageUtil"%>
<%
	Hashtable paraMap = new Hashtable();
	String n_ch_id = "", ch_type = "";
	if (request.getParameter("ch_id") != null
			&& !request.getParameter("ch_id").equals("")) {
		n_ch_id = request.getParameter("ch_id");
		paraMap.put("ch_attr", n_ch_id);
	}

	B2CHelpIndexFiles helpInfo = new B2CHelpIndexFiles();
	List helpList = helpInfo.getHelpInfo(paraMap);

	String com_page = "/about/help_list.html";

	int limit = 10;
	int start = 0, end = limit;
	int startPage = 1;
	if (request.getParameter("start") != null
			&& !request.getParameter("start").equals("")) {
		start = Integer.parseInt(request.getParameter("start"));
	}
	if (start == 1 || start == 0) {
		start = 0;
		startPage = 1;
	} else {
		startPage = start;
		start = (start - 1) * limit;
	}
	end = start + limit;
	int counter = 0;
	if (helpList != null && helpList.size() > 0)
		counter = helpList.size();
	if (end > counter) {
		end = counter;
		start = counter - limit;
		if (start < 0)
			start = 0;
	}
	PageUtil pageUtil = new PageUtil("[index/]", "[uppage/]",
			"[downpage/]", "[lastpage/]", "第[current/]页/共[total/]页",
			"[num/]", "[thisnum/]");
	String pageString = pageUtil.getPageString(com_page, counter,
			limit, startPage, request);
	String area_name = "";
	if (request.getParameter("area_name") != null
			&& !"".equals(request.getParameter("area_name"))) {
		area_name = new String(request.getParameter("area_name")
				.getBytes("ISO8859-1"), "UTF-8");
	}
	String nav_style = request.getParameter("nav_style");
	String nav_sty_str = "";
	if(nav_style != null){
		nav_sty_str = "&nav_style="+nav_style;
	}
%>
<!DOCTYPE html PUBliC "-//W3C//dtD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/dtD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>帮助中心</title>
				<link href="/templets/html/shop/css/style.css" rel="stylesheet"
			type="text/css" />
		<link href="/templets/html/shop/css/help.css" rel="stylesheet"
			type="text/css" />
				<script type='text/javascript' src='/dwr/engine.js'></script>
		<script type='text/javascript' src='/dwr/util.js'></script>
		<script type='text/javascript' src='/dwr/interface/Ti_subscribeInfo.js'></script> 
		<script type='text/javascript' src='/templets/html/shop/js/_shop.js'></script>
			
	</HEAD>
	<BODY >
<script >
  document.write("<s" + "cript type='text/javascript' src='/templets/html/shop/top.jsp'></scr" + "ipt>"); 
</script>
		
	<div id="contaner">
			<div class="help_main">
				<div class="sidebar">
					<ul>
						<%
												Hashtable contentMap = new Hashtable();
												if (null != helpList && helpList.size() > 0) {
													end = (end > helpList.size()) ? helpList.size() : end;
													for (int i = start; i < end; i++) {

														contentMap = (Hashtable) helpList.get(i);
														String _title = "", ch_attr = "",info_id="";
														if (contentMap.get("title") != null)
															_title = contentMap.get("title").toString();
														if (contentMap.get("ch_attr") != null)
															ch_attr = contentMap.get("ch_attr").toString();
														if (contentMap.get("info_id") != null)
															info_id = contentMap.get("info_id").toString();
														String hrefurl = "/about/help_list.html";
														if(ch_type.equals("1")){
															hrefurl = "/about/shop_help.html";
														}
														hrefurl += "?ch_id="+ch_attr;
											%>
									<li><a href="<%=hrefurl+nav_sty_str%>"><%=_title%></a></li>
									<%}} %>
					</ul>
				</div>
				<%
							if (null != helpList && helpList.size() > 0){
								contentMap = (Hashtable) helpList.get(0);
							String title = "", content = "";
							if (contentMap.get("title") != null)
								title = contentMap.get("title").toString();
							if (contentMap.get("content") != null)
								content = contentMap.get("content").toString();%>
								
								<div class="content_01">
								<h4>
									<%=title %>
								</h4>
									<%=content %>
			
							</div>
								
							<%}
							
						%>
				
			</div>


			<jsp:include page="/templets/html/shop/footer.jsp" />
												

	</BODY>
</HTML>
